package com.zdb.demo.design.pattern.structural.proxy.db;

public class DataSourceContextHolder {

    private static ThreadLocal<String> dbTypes = new ThreadLocal<>();

    public static void setDbType(String dbType) {
        dbTypes.set(dbType);
    }

    public static String getDbType() {
        return dbTypes.get();
    }

    public static void clear() {
        dbTypes.remove();
    }
}
